package com.wchat.network.message;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

@Root
public class TextMessage extends Message {

	private static final long serialVersionUID = 8903976892694316002L;
	
	@Element
	private String text = "";

	public TextMessage() {
		super();
	}
	
	public TextMessage(String text) {
		super();
		this.text = text;
	}
	
	public String getText() {
		return text;
	}
	
	@Override
	public byte getType() {
		return Message.TYPE_TEXT;
	}

	@Override
	public String toString() {
		return "TextMessage [text=" + text + ", from=" + from + "]";
	}

}
